<?php

namespace Zilla\FrontBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use FOS\UserBundle\Entity\User as FOSUser;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\Common\Collections\ArrayCollection;
/**
 * Zilla\FrontBundle\Entity\ProWinker
 *
 * @ORM\Table(name="pro_winker")
 * @ORM\InheritanceType("JOINED")
 * @ORM\DiscriminatorColumn(name="type", type="string");
 * @ORM\DiscriminatorMap({"pro_winker"= "ProWinker"})
 * @ORM\Entity(repositoryClass="Zilla\FrontBundle\Entity\ProWinkerRepository")
 */
class ProWinker extends FOSUser
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @var string $name
     *
     * @ORM\Column(name="name", type="string", length=255, nullable=true)
     */
    protected $name;
    
    /**
     * @var string $positionLatitude
     *
     * @ORM\Column(name="position_latitude", type="string", length=255, nullable=true)
     */
    protected $positionLatitude;
    
    /**
     * @var string $positionLongitude
     *
     * @ORM\Column(name="position_longitude", type="string", length=255, nullable=true)
     */
    protected $poisitionLongitude;
    
    /**
     * 
     * @var string
     * 
     * @ORM\Column(name="website", type="string", length=255, nullable=true)
     */
    protected $website;
    
    /**
     * 
     * @var string
     * 
     * @ORM\Column(name="phone", type="string", length=255, nullable=true)
     */
    protected $phone;
    
    /**
     *  @var datetime $createdAt
     * 
     * @Gedmo\Timestampable(on="create") 
     * @ORM\Column(name="created_at", type="datetime")
     */
    protected $createdAt;
    
    /**
     *  @var datetime $updatedAt
     * 
     * @Gedmo\Timestampable(on="update") 
     * @ORM\Column(name="updated_at", type="datetime")
     */
    private $updatedAt;
    
     /**
     * 
     * @var string $slugName
     * @Gedmo\Slug(fields={"username"})
     * @ORM\Column(name="slug_name",length=255, unique=true)
     */
    protected $slugName;

    /**
     * 
     * Bidirectional 
     * 
     * @var ProWinkerCategory $proWinkerCategory
     * 
     * @ORM\ManyToOne(targetEntity="ProWinkerCategory", inversedBy="proWinkers")
     * @ORM\JoinColumn(name="category_id", referencedColumnName="id")
     */
    protected $proWinkerCategory;
    
    /**
     * 
     * Bidirectional 
     * 
     * @var Region $region
     * 
     * @ORM\ManyToOne(targetEntity="Region", inversedBy="proWinkers")
     * @ORM\JoinColumn(name="region_id", referencedColumnName="id")
     */
    protected $region;
    
    /**
     * 
     * Bidirectional 
     * 
     * @var ArrayCollection $stores
     * 
     * @ORM\OneToMany(targetEntity="Store", mappedBy="owner")
     */
    protected $stores;
    
    /**
     * 
     * @var ArrayCollection $winkerStores
     * 
     * @ORM\ManyToMany(targetEntity="Store", mappedBy="proFollowers")
     */
    protected $winkedStores;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return ProWinker
     */
    public function setName($name)
    {
        $this->name = $name;
    
        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }
    
    /**
     * 
     * @return string
     */
    public function getPositionLatitude()
    {
        return $this->positionLatitude;
    }

    /**
     * 
     * @param string $positionLatitude
     */
    public function setPositionLatitude($positionLatitude)
    {
        $this->positionLatitude = $positionLatitude;
    }

    /**
     * 
     * @return string
     */
    public function getPoisitionLongitude()
    {
        return $this->poisitionLongitude;
    }

    /**
     * 
     * @param string $poisitionLongitude
     */
    public function setPoisitionLongitude($poisitionLongitude)
    {
        $this->poisitionLongitude = $poisitionLongitude;
    }

    /**
     * 
     * @return string
     */
    public function getWebsite()
    {
        return $this->website;
    }

    /**
     * 
     * @param string $website
     */
    public function setWebsite($website)
    {
        $this->website = $website;
    }
    
    /**
     * 
     * @return string
     */
    public function getPhone()
    {
        return $this->phone;
    }

    /**
     * 
     * @param string $phone
     */
    public function setPhone($phone)
    {
        $this->phone = $phone;
    }
    
    /**
     *
     * @return datetime
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     *
     * @param datetime $created 
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;
    }
    
    /**
     *
     * @return datetime
     */
    public function getUpdatedAt()
    {
        return $this->updatedAt;
    }

    /**
     *
     * @param datetime $updatedAt 
     */
    public function setUpdatedAt($updatedAt)
    {
        $this->updatedAt = $updatedAt;
    }
            
    /**
     *
     * @return string
     */ 
    public function getSlugName()
    {
        return $this->slugName;
    }
    
    /**
     *
     * @param string $slugName 
     */
    public function setSlugName($slugName)
    {
        $this->slugName = $slugName;
    }
       
    /**
     *
     * @return ProWinkerCategory 
     */
    public function getProWinkerCategory()
    {
        return $this->proWinkerCategory;
    }

    /**
     *
     * @param ProWinkerCategory $proWinkerCategory 
     */
    public function setProWinkerCategory($proWinkerCategory)
    {
        $this->proWinkerCategory = $proWinkerCategory;
    }
    
    
    /**
     * 
     * @return Region
     */
    public function getRegion()
    {
        return $this->region;
    }

    /**
     * 
     * @param Region $region
     */
    public function setRegion(Region $region)
    {
        $this->region = $region;
    }
    
    /**
     *
     * @return ArrayCollection
     */
    public function getStores()
    {
        return $this->stores;
    }

    /**
     *
     * @param ArrayCollection $stores 
     */
    public function setStores(ArrayCollection $stores)
    {
        $this->stores = $stores;
    }
    
    /**
     *
     * @param Store $store 
     */
    public function addStore(Store $store)
    {
        $this->stores->add($store);
    }

    /**
     *
     * @return ArrayCollection
     */
    public function getWinkedStores()
    {
        return $this->winkedStores;
    }

    /**
     * 
     * @param ArrayCollection $winkedStores
     */
    public function setWinkedStores(ArrayCollection $winkedStores)
    {
        $this->winkedStores = $winkedStores;
    }
    
    /**
     * 
     * @param Store $winkedStore
     */
    public function addWinkedStore(Store $winkedStore)
    {
        $this->winkedStores->add($winkedStore);
    }



}
